package cn.skyquant.quant4j.jforex.sdk.strategy;

public class Boll {
    public final double up;
    public final double m;
    public final double low;
    public final double diff;

    public Boll(double up, double m , double low) {
        this.up = up;
        this.m = m;
        this.low = low;
        diff = up - low;
    }

    public Boll(double up,double m ,double low,double diff) {
        this.up = up;
        this.m = m;
        this.low = low;
        this.diff = diff;
    }

    public String toStringDiff(InstrumentEntity ie) {
        return ie.formatPrice(up)+"-"+ie.formatPrice(low)+"="+ie.formatPrice(diff);
    }

    public String toStringM(InstrumentEntity ie) {
        return ie.formatPrice(m);
    }


    @Override
    public String toString() {
        return "Boll{" +
                "up=" + up +
                ", m=" + m +
                ", low=" + low +
                ", diff=" + diff +
                '}';
    }
}
